JSF + PrimeFaces: `update` attribute does not update component
Posted
by
Harry Pham
on Stack Overflow
See other posts from Stack Overflow
or by Harry Pham
Published on 2011-01-01T04:45:10Z
Indexed on
2011/01/01
4:54 UTC
Read the original article
Hit count: 279
jsf
|primefaces
Here is my layout
<div id="mainPanel">
<div id="padding">
<h:outputText id="text" value="Personal Feed" rendered="#{Profile.renderComment}"/>
</div>
<div id="right">
<h:form>
<p:commandButton value="Update" actionListener="#{bean.toggleComment}" update="text" />
</h:form>
</div>
</div>
When I click the link Update
, which suppose to toggle the renderComment
boolean on and off, but it does not toggle the display of the text Personal Feed
. Now if I put a form around the h:outputText
, and instead update
the form
instead, then it work. Why is that?
© Stack Overflow or respective owner